package com.service.healthycode.service.impl;

import com.service.healthycode.dao.UserLoginRecordsDao;
import com.service.healthycode.entity.UserLoginRecords;
import com.service.healthycode.service.UserLoginRecordsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: hjl
 * @date: 2022/04/12 17:10
 * @description
 */
@Slf4j
@Service
public class UserLoginRecordsServiceImpl implements UserLoginRecordsService {
    @Resource
    private UserLoginRecordsDao recordsDao;

    @Override
    public void update(UserLoginRecords loginRecords) {
        recordsDao.update(loginRecords);
    }

    @Override
    public void insertOrUpdateBatch(List<UserLoginRecords> userLoginRecordList) {
        try{
            recordsDao.insertOrUpdateBatch(userLoginRecordList);
        }catch (Exception e) {
            log.info(""+e.getMessage());
        }

    }
}
